﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace shenghua.Express
{
    public interface IThirdPartyWuliuManagerBase
    {
        WuliuQueryResult Query(string number, string type = null);
    }

    public class WuliuQueryResult
    {
        public bool Success
        {
            get
            {
                return Errors == null || Errors.Count == 0;
            }
        }
        public List<string> Errors { get; set; }
        public string Number { get; set; }
        public string Type { get; set; }
        public List<QueryItem> Items { get; set; }

        public WuliuQueryResult()
        {
            Errors = new List<string>();
            Items = new List<QueryItem>();
        }

        public class QueryItem
        {
            public string Time { get; set; }
            public string Description { get; set; }
        }
    }
}
